import request from '@/utils/request'

const pref = '/sysJob'

export const getPage = (param) => {
  return request.post(pref + '/getPage', param)
}

export const onPause = (id) => {
  return request.post(pref + '/pause?id=' + id)
}

export const onRestart = (id) => {
  return request.post(pref + '/restart?id=' + id)
}

export const save = (param) => {
  return request.post(pref, param)
}

export const getOne = (id) => {
  return request.get(pref + '?id=' + id)
}

export const runOnce = (service) => {
  return request.post(pref + '/runOnce?service=' + service)
}